import request from '@/utils/request'

// 获取角色
export function indexRole(params) {
  return request({
    url: '/admin/role/',
    method: 'get',
    params: params
  })
}

// 修改角色
export function changeRole(data) {
  return request({
    url: '/admin/role/change',
    method: 'post',
    data
  })
}

// 删除角色
export function deleteRole(params) {
  return request({
    url: '/admin/role/delete',
    method: 'get',
    params: params
  })
}

// 获取角色权限
export function getPermissionRole(data) {
  return request({
    url: '/admin/role/getPermission',
    method: 'get',
    data
  })
}

//修改角色权限
export function changePermissionRole(data) {
  return request({
    url: '/admin/role/changePermission',
    method: 'get',
    data
  })
}

